#pragma once
#include "ientity.h"

enum ObjectType	{OBJ_BASE, OBJ_PLATFORM, OBJ_PLAYER, OBJ_ENEMY, OBJ_TILE, OBJ_EVENT, OBJ_BULLET, OBJ_FLYING_ENEMY,OBJ_SHOOT_ENEMY,OBJ_JUMPER_ENEMY,OBJ_BOSS1,OBJ_BOSS2,OBJ_BASIC_ENEMY};

class CEntity : public IEntity
{
private:
	float m_fPosX;
	float m_fPosY;
	int m_nWidth;
	int m_nHeight;
	int m_nDensity;
	float m_fVelX;
	float m_fVelY;
	int m_nImgID;
	unsigned int	m_unRefCount;
protected:
	ObjectType	m_eType;
public:
	CEntity(void);
	~CEntity(void);
	virtual void SetPosX(float fPosX){m_fPosX = fPosX;}
	virtual void SetPosY(float fPosY){m_fPosY = fPosY;}
	virtual void SetWidth(int nWidth){m_nWidth = nWidth;}
	virtual void SetHeight(int nHeight){m_nHeight = nHeight;}
	virtual void SetDensity(int nDensity){m_nDensity = nDensity;}
	virtual void SetVelX(float fVelX){m_fVelX = fVelX;}
	virtual void SetVelY(float fVelY){m_fVelY = fVelY;}
	virtual void SetImgId(int nImgID){m_nImgID = nImgID;}
	virtual float GetPosX(void)const{return m_fPosX;}
	virtual float GetPosY(void)const{return m_fPosY;}
	virtual int GetWidth(void)const{return m_nWidth;}
	virtual int GetHeight(void)const{return m_nHeight;}
	virtual int GetDensity(void)const{return m_nDensity;}
	virtual float GetVelX(void)const{return m_fVelX;}
	virtual float GetVelY(void)const{return m_fVelY;}
	virtual int	GetImageID(void)const{return m_nImgID;}
	virtual void Update(float fElapsedTime);
	virtual void Render(void);
	virtual void AddRef(void);
	virtual void Release(void);
	virtual int  GetType(void)const{return m_eType;}
	virtual void SetType(ObjectType type) {m_eType = type;}
	virtual RECT GetRect(void)const;
	virtual bool CheckCollision(IEntity* pOther);
};